1. Field of the Invention
An aspect of this disclosure relates to an image processing apparatus, an image processing system, an image processing method, and a storage medium.
2. Description of the Related Art
Digital image data (which is hereafter simply referred to as “image data”) is obtained by, for example, capturing an image with a digital camera or scanning a document such as a photograph with a scanner. Such image data is used in various manners. For example, image data is output by a printer onto recording paper, or is displayed on multiple monitors connected via the Internet.
Thus, image data is output to, for example, recording paper or monitors and is thereby made visible. Depending on purposes, image data needs to be output with high image quality.
Image quality may be degraded by various causes. Particularly, a phenomenon where a color (hue) of an object in image data appears to be different from a memory color of the object causes a viewer to feel odd, and is one of the causes that greatly degrade image quality. The phenomenon where the color (hue) of an object changes is called, for example, “color casting”. To reduce or prevent color casting, it is necessary to perform a complicated correction process on image data with, for example, image conversion software.
Although color casting is caused by various reasons, it is normally caused by the influence of a light source used when capturing image data.
When the color temperature of a light source used when capturing image data of an object is higher or lower than the color temperature of a standard white light source (e.g., a light source with a color temperature of 5000 K), the color (hue) of the object naturally changes depending on the color temperature of the used light source. Because human vision has a characteristic to adapt to light sources with different color temperatures to some extent, a change in the color (hue) of an object appears to be less significant in an environment where image data of the object is captured. For this reason, when a viewer sees a change in the color (hue) of an object in captured image data, it causes the viewer to feel odd.
Also, the spectral sensitivity of human eyes does not generally match the spectral sensitivity of an image sensor. Therefore, depending on the spectral characteristics of a light source used when capturing image data of an object, the color (hue) of the object may be seen as normal for human eyes (regardless of the adaptation of human vision), but may be changed in the captured image data.
To prevent or reduce the above problems, it is necessary to obtain or estimate characteristic information (e.g., a color temperature and/or spectral characteristics) of a light source used when capturing image data, and correct the image data based on the characteristic information.
To obtain accurate characteristic information of a light source used when capturing image data, sensors for obtaining the characteristic information may be provided separately from an image sensor. However, this approach may increase the costs and/or the size of an imaging apparatus, and is therefore not the best solution. For this reason, characteristic information of a light source used when capturing image data is generally estimated by analyzing information of the captured image data.
Here, different from primary colors such as red and yellow, a slight change in a skin color greatly influences the visual appearance of an image, and therefore a change in a skin color caused by color casting tends to greatly reduce image quality. For this reason, it is necessary to more accurately estimate light source characteristics when capturing image data of a person, and methods for estimating light source characteristics based on skin information in image data have been proposed.
For example, Japanese Laid-Open Patent Publication No. 2012-023692 discloses an image processing method for preventing a problem such as color casting in an image. In the disclosed image processing method, a skin portion and a high-intensity portion are extracted from image data, and image correction is performed such that the positional relationship between the skin portion and the high-intensity portion in a color space becomes equal to the positional relationship of a reference vector.
With the image processing method disclosed by Japanese Laid-Open Patent Publication No. 2012-023692, however, because the skin portion and the high-intensity portion are extracted without taking into account the correlation between them, it is not possible to accurately perform color correction when the light source conditions for the skin portion and the high-intensity portion are different from each other.
Also with the disclosed method, it is not possible to accurately perform color correction when a high-lightness portion of an object with high saturation (e.g., a bright portion of a yellow object) is extracted as the high-intensity portion.